package com.lc1993929.chapter18.CAD;

import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.List;

/**
 * Created by LiuChang on 2018/8/16.
 */
public class RecoverCADState {
    public static void main(String[] args) throws Exception {
        ObjectInputStream in = new ObjectInputStream(
                new FileInputStream("CADState.out")
        );
        //    Read in the same order they were written;
        List<Class<? extends Shape>> shapeTypes =
                (List<Class<? extends Shape>>) in.readObject();
        Line.deserializeStaticState(in);
        List<Shape> shapes = (List<Shape>) in.readObject();
        System.out.println(shapes);
    }
}
